<template>
  <div>
    <el-table
      :data="tableData"
      style="width: 100%"
      height="280"
      :header-cell-style="{
        background: 'rgba(11, 132, 123, 0.08)',
        color: '#000',
      }"
      @row-click="rowClick"
    >
      <el-table-column label="业务类型" align="center">
        <template slot-scope="scoep">
          {{ scoep.row.type ? scoep.row.type : "--" }}
        </template>
      </el-table-column>
      <el-table-column label="标题/事由" align="center">
        <template slot-scope="scoep">
          {{ scoep.row.name ? scoep.row.name : "--" }}
        </template>
      </el-table-column>
      <el-table-column prop="promoter" label="发起人" align="center">
        <template slot-scope="scoep">
          {{ scoep.row.promoter ? scoep.row.promoter : "--" }}
        </template>
      </el-table-column>
      <el-table-column prop="date" label="发起日期" align="center">
        <template slot-scope="scoep">
          {{ scoep.row.date ? scoep.row.date : "--" }}
        </template>
      </el-table-column>
      <el-table-column prop="approveUser" label="当前审批人" align="center">
        <template slot-scope="scoep">
          {{ scoep.row.approveUser ? scoep.row.approveUser : "--" }}
        </template>
      </el-table-column>
      <el-table-column prop="status" label="审批状态" align="center">
        <template slot-scope="scoep">
          {{ scoep.row.status ? scoep.row.status : "--" }}
        </template>
      </el-table-column>
    </el-table>
  </div>
</template>

<script>
export default {
  props: {
    tableData: {
      type: Array,
      default: () => [],
    },
  },
  data() {
    return {};
  },
  created() {},
  methods: {
    // 点击某一行
    rowClick(row, column, event) {
      console.log(row, column, event);
    },
  },
};
</script>

<style lang="scss" scoped></style>
